package com.simple.accounting.frag_record;
import com.simple.accounting.R;
import com.simple.accounting.db.DBManager;
import com.simple.accounting.db.TypeBean;
import java.util.List;
/**
 * 收入记录页面
 */
public class IncomeFragment extends BaseRecordFragment {


    @Override
    public void loadDataToGV() {
        super.loadDataToGV();
        //获取数据库当中的数据源
        List<TypeBean> incomeLists = DBManager.getTypeList(1);
        typeList.addAll(incomeLists);
        adapter.notifyDataSetChanged();
        typeTv.setText("薪资");
        typeIv.setImageResource(R.mipmap.xinzi_blue);
    }

    @Override
    public void saveAccountToDB() {
        accountBean.setKind(1);
        DBManager.insertItemToAccountTb(accountBean);
    }
}
